Image config option added: rebuildOnContextPathChanges #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm working to make BinderHub's CI system easy to understand and performant, current tests take at least 13 minutes to complete, but this can change by not rebuilding the binderhub Docker image on any change as we currently do.
This PR adds the feature to allow the configuration option for indvidual images, which I named to
rebuildOnContextPathChanges
. Chartpress will assume this to be True by default, but if it is set to false, it will stop including the image's docker build contextPath as something that should be monitored for a rebuild indication whenever something changes.With this disabled, one need to manually add paths that should be monitored to trigger changes though. In the jupyterhub/binderhub repo, I tested the following chartpress.yaml configuration which worked well.
The old one didn't specify
paths
or had therebuildOnContextPathChanges: false
configuration, but ended up rebuilding the Dockerfile on any change because the contextPath was set to the root of the repo, in order to be able to copy the binderhub folder with the Python package.I've documented it in the Readme, but didn't add a test other than test it myself locally. I think it should be fine to leave untested as it is a quite simple feature.